package zj.xinxin.business.business.security.converter;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import zj.xinxin.api.moudle.security.dto.RoleDto;
import zj.xinxin.api.moudle.security.entity.RoleEntity;
import zj.xinxin.api.moudle.security.vo.RoleCreateVo;
import zj.xinxin.api.moudle.security.vo.RoleUpdateVo;

/**
 * @author junzhou
 * @date 2022/4/5 17:08
 * @since 1.8
 */
@Mapper(componentModel = "spring")
public interface RoleConverter {

    RoleConverter INSTANCE = Mappers.getMapper(RoleConverter.class);

    RoleDto toDto(RoleEntity roleEntity);

    RoleEntity toEntity(RoleCreateVo roleInfo);

    RoleEntity toEntity(RoleUpdateVo roleInfo);

}
